#{extends 'CRUD/layout.html' /}
#{set title:messages.get('crud.list.title', type.name) /}

<div id="crudList" class="${type.name}">

    <h2 id="crudListTitle">&{'crud.list.title', type.name}</h2>

    <div id="crudListSearch">
        #{crud.search /}
    </div>

    <div id="crudListTable">
        #{crud.table fields:[ 'Clef:Valeur', 'Batiment', 'Activite']}
		#{crud.custom 'Clef:Valeur'}
		       <a href="@{Descriptions.show(object.id)}">${object.toString()}</a>
		#{/crud.custom}

		#{crud.custom 'Batiment'}
		       <a href="@{Batiments.show(object.batimentActivite.batiment.id)}">${object.batimentActivite.batiment.nom}</a>
		#{/crud.custom}

		#{crud.custom 'Activite'}
		       <a href="@{Activites.show(object.batimentActivite.activite.id)}">${object.batimentActivite.activite.libelle}</a>
		#{/crud.custom}
	 #{/crud.table}
    </div>

    <div id="crudListPagination">
        #{crud.pagination /}
    </div>

    <p id="crudListAdd">
        <a href="@{blank()}">&{'crud.add', type.modelName}</a>
    </p>

</div>

